package com.example.mapper;

import com.example.pojo.Baobiao;
import com.example.pojo.Emp;
import org.apache.ibatis.annotations.*;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface BaobiaoMapper {
    @Insert("insert into baobiao (metrname,payid,num,date,status) values (#{metrname},#{payid},#{num},#{date},#{status})")
    void add(Baobiao baobiao);

    Long count(String metrname, String status, LocalDate begin, LocalDate end);

    List<Baobiao> page(Integer start, Integer pageSize, String metrname, String status, LocalDate begin, LocalDate end);
@Select("select stockQuantity from materials where materialName = #{materialName}")
    int getNum(String metrname);
@Update("update baobiao set status=#{status} where id=#{id}")
    void update(Baobiao baobiao);
@Update("update baobiao set status=#{status} where id=#{id}")
    void update2(Baobiao baobiao);
@Delete("delete from baobiao where id=#{id}")
    void delete(Integer id);

    void deletes(int[] id);
}
